﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

namespace ZiChen.SoXunLeiPan.Service
{
    public interface IHttpService
    {
        /// <summary>
        /// 发送 GET 请求并反序列化为指定类型
        /// </summary>
        Task<T> GetAsync<T>(string url, string clientName = "default", IDictionary<string, string>? headers = null);
        /// <summary>
        /// 发送 POST 请求并发送 JSON 数据
        /// </summary>
        Task<TResponse> PostAsync<TRequest, TResponse>(string url, TRequest data, string clientName = "default", IDictionary<string, string>? headers = null);
    }
}
